#!/bin/bash
###########################################################
# Mark update and exec binary
# This is not used with the gnome extension for
# core22 and later, please see
# https://github.com/canonical/snapcraft-desktop-integration
###########################################################

# shellcheck disable=SC2154
[ "$needs_update" = true ] && echo "SNAP_DESKTOP_LAST_REVISION=$SNAP_REVISION" > "$SNAP_USER_DATA/.last_revision"

wait_for_async_execs

if [ -n "$SNAP_DESKTOP_DEBUG" ]; then
  echo "desktop-launch elapsed time: $(date +%s.%N --date="$START seconds ago")"
  echo "Now running: exec $*"
fi

exec "$@"
